package com.yingluo.abacus.cloud.service.web;

import com.yingluo.abacus.cloud.service.web.utils.ServiceWebUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value =  ServiceWebUtils.MODULE_SERIVCEWEB)
public class FeignControler {
    private static final Logger logger = LoggerFactory.getLogger(FeignControler.class);

    @Autowired
    IFeign feign;

    @RequestMapping(value = "/feign", method = RequestMethod.GET)
    public String excute( ) {
        String str =null;
        try { 
            str = feign.execute( );
            logger.debug(str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return str;
    }
}
